<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>我的积分 - DTcms网站管理系统</title>
    <link rel="stylesheet" type="text/css" href="js/ui-dialog.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="scripts/artdialog/dialog-plus-min.js"></script>
    <script type="text/javascript" src="js/common.js"></script>

    <script>
        // 用户未登录,则中转到登录界面
        let token = sessionStorage.token || localStorage.token;
        if (!token) {
            location.href = '/login.html';
        }
    </script>

</head>

<body>

<!--页面头部-->
<div id="header"></div>
<script>$("#header").load("_header.html");</script>
<!--/页面头部-->

<!--当前位置-->
<div class="section">
    <div class="location">
        <span>当前位置：</span>
        <a href="">首页</a> &gt;
        <a href="">会员中心</a>&gt;
        <a href="">地址管理</a>
    </div>
</div>
<!--/当前位置-->

<div class="section clearfix" id="app">
    <!--页面左边-->
    <div class="left-260">
        <div class="bg-wrap">
            <div class="avatar-box">
                <a class="img-box" href="/user/center/avatar.html">
                    <i class="iconfont icon-user-full"></i>
                </a>
                <h3>
                    django
                </h3>
                <p><b>注册会员</b></p>
            </div>

            <div class="center-nav">
                <ul>
                    <li>
                        <h2>
                            <i class="iconfont icon-user"></i>
                            <span>地址管理</span>
                        </h2>
                        <div class="list">
                            <p><a href="user_center_address.html">
                                <i class="iconfont icon-arrow-right"></i>地址列表</a></p>
                        </div>
                    </li>
                </ul>
            </div>

        </div>
    </div>
    <!--/页面左边-->

    <!--页面右边-->
    <div class="right-auto">
        <div class="bg-wrap" id="list_address">
            <!--积分明细-->
            <div class="sub-tit">
                <span>地址列表</span>
            </div>

            <div class="table-wrap">
                <table width="100%" class="mtable" border="0" cellspacing="0" cellpadding="0">
                    <tbody>

                    <tr>
                        <td width="100"><b>默认地址</b></td>
                        <td width="80"><b>收件人</b></td>
                        <td width="250"><b>所属地区</b></td>
                        <td width="250"><b>详细地址</b></td>
                        <td width="100"><b>电话号码</b></td>
                        <td width="50"><b>电话</b></td>
                        <td width="50"><b>邮编</b></td>
                        <td width="50"><b>操作</b></td>
                    </tr>

                    <tr v-for="(address, index) in addresses">
                        <td >
                            <input type="radio" :value="address.id" v-model="default_address_id"/>
                        </td>
                        <td width="50">{{ address.receiver }}</td>
                        <td>{{ address.province }} {{ address.city }} {{ address.district }} </td>
                        <td>{{ address.place }}</td>
                        <td>{{ address.mobile }}</td>
                        <td>{{ address.tel }}</td>
                        <td>{{ address.email }}</td>
                        <td width="35">
                            <a @click="delete_address(address.id)" href="javascript:;">删除</a>
                        </td>
                    </tr>

                    </tbody>
                </table>

                <div class="page-foot">
                    <div class="btn-box">
                        <a href="user_center_address_add.html">新增地址</a>
                        <a href="javascript:;" @click="set_default()">保存默认地址</a>
                    </div>
                </div>
            </div>
            <!--/积分明细-->
        </div>
    </div>
    <!--/页面右边-->
</div>

<!--页面底部-->
<div id="footer"></div>
<script>$("#footer").load("_footer.html");</script>
<!--/页面底部-->

<script type="text/javascript" src="js/axios-0.18.0.min.js"></script>
<script type="text/javascript" src="js/vue-2.5.16.js"></script>
<script type="text/javascript" src="js/user_center_address.js"></script>

</body>
</html>